package com.ming_za.odupdaterserver.core.annotation;

import jakarta.validation.ConstraintValidator;
import jakarta.validation.ConstraintValidatorContext;

public class ClientPathValidator implements ConstraintValidator<ClientPath, String> {
    @Override
    public boolean isValid(String string, ConstraintValidatorContext constraintValidatorContext) {
        return string == null || (!string.contains("../") && !string.contains("..\\") && !string.contains(":"));
    }
}
